package www.xpu.edu.app;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class Test20190424 extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test20190424);
        Button button=(Button)findViewById(R.id.button20190424);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(Test20190424.this,"输出",Toast.LENGTH_LONG).show();
            }
        });




        button.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.button20190424:
                Toast.makeText(Test20190424.this,"输出",Toast.LENGTH_LONG).show();
                break;
                default:
                    break;
        }
    }
}
